# -*- coding: utf-8 -*-
__author__ = 'joko'

"""
@author:zhangchao
@time: 20180423
"""
import GetDevice
from source.util.LogUtil import log

@log()
def check_environment():
    # appium = U.cmd("appium -v").stdout.readline().strip()
    # appium=os.popen('appium -v').readline()
    # if '1.' not in appium :
    #     print('appium not in computer')
    #     exit()
    # else:
    #     print('appium version {}'.format(appium))
    devices_list=GetDevice.get_device()
    if not devices_list:
        print('the computer is not connected to any devices')
        exit()
    pass

if __name__ == '__main__':
    check_environment()